home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / shar-3.49 / Makefile next >
Encoding:
Makefile  |  1995-05-03  |  3.2 KB  |  122 lines

  1. DESTDIR=/usr/skunk
  2. #  makefile for shar
  3. #
  4. # $Header: /u/rhg/src/shar/Makefile,v 3.49 90/09/12 15:14:18 rhg Exp $
  5. #
  6. #+:EDITS:
  7. #:09-09-1990-20:12-rhg@cps.com-added CLOSEDIR_VOID
  8. #:09-09-1990-11:31-bill@netagw.com-add SHELL variable/-ldir for XENIX/UNIX 386
  9. #:08-07-1990-21:25-rhg@cps.com-compress man pages if MANEXT ends with .Z
  10. #:08-05-1990-23:50-rhg@cps.com-add post and compressed.
  11. #:08-05-1990-12:19-rhg@cps.com-add LIBS and -ldirent
  12. #:08-04-1990-18:51-rhg@cps.com-add CC, LD; move strip; reorder chgrp/chown.
  13. #:05-14-1990-17:33-wht@n4hgf-add -F 5000 for XENIX 286
  14. #:05-14-1990-17:32-bill@netagw.com-expanded Makefile
  15. #:03-28-1990-14:54-wht@n4hgf-for 3.10, add who@where.c
  16.  
  17. SHELL=/bin/sh
  18.  
  19. BINDIR    = $(DESTDIR)/bin
  20. OWNER    = bin
  21. GROUP    = bin
  22. BINMODE    = 0755
  23. MANDIR    = $(DESTDIR)/man/man.1
  24. MANEXT    = 1
  25. MANOWN    = bin
  26. MANGRP    = bin
  27. MANMODE    = 0644
  28.  
  29. CC    = cc
  30. LD    = ${CC}
  31.  
  32. # If you don't have Doug Gwyn's dirent routines or equivalent, then remove
  33. # -ldirent from LIBS and add -DNO_WALKTREE to CFLAGS.  All you will give up
  34. # is the ability to shar directorys without using "find ... -type f | shar -S".
  35. # Note that many systems have the equivalent of the dirent library built into
  36. # the standard C library.  For such systems, just remove -ldirent from LIBS.
  37. # (note by RHG@CPS.COM: I don't know which systems listed below are like that.)
  38. # Some systems, such as SCO XENIX/UNIX 386 use -ldir instead.
  39. # Some systems, such as SunOS 3, use <sys/dir.h> instead of <dirent.h>.  For
  40. # these systems, add -DNO_DIRENT to CFLAGS.  Many of these same systems, such
  41. # as BSD, have a closedir that has no return value.  For these systems, add
  42. # both -DNO_DIRENT and -DCLOSEDIR_VOID to CFLAGS.
  43.  
  44. # For VAX, PYRAMID, SEQUENT, AT&T 3B1/7300
  45. #CFLAGS    = -O 
  46. #LDFLAGS    =
  47. #LIBS    = -ldirent
  48.  
  49. # For SUN
  50. #CFLAGS    = -O -DNO_DIRENT -DCLOSEDIR_VOID
  51. #LDFLAGS    =
  52. #LIBS    =
  53.  
  54. # For SCO XENIX/UNIX 386
  55. CFLAGS    = -O -DCLOSEDIR_VOID
  56. LDFLAGS    =
  57. LIBS    = -lsocket -lmalloc -lc_s
  58.  
  59. # For SCO XENIX 286
  60. #CFLAGS    = -O 
  61. #LDFLAGS    = -F 5000
  62. #LIBS    = -ldirent
  63.  
  64. # For other System V systems I did not catch
  65. #CFLAGS    = -O -DSYS5
  66. #LDFLAGS    =
  67. #LIBS    = -ldirent
  68.  
  69. # For BSD-like systems
  70. #CFLAGS    = -O -DBSD42 -DNO_DIRENT -DCLOSEDIR_VOID
  71. #LDFLAGS    =
  72. #LIBS    =
  73.  
  74. SOURCES    = README Makefile shar.1 unshar.1 uushar.c who@where.c unshar.c shar.c
  75.  
  76. SHAR    = shar.o uushar.o who@where.o
  77. UNSHAR    = unshar.o
  78.  
  79. all: shar unshar
  80.  
  81. shar: ${SHAR}
  82.     ${LD} ${LDFLAGS} ${SHAR} ${LIBS} -o shar
  83.  
  84. unshar : ${UNSHAR}
  85.     ${LD} ${LDFLAGS} ${UNSHAR} ${LIBS} -o unshar
  86.  
  87. shar.o : shar.c
  88.     ${CC} ${CFLAGS} -c shar.c
  89.  
  90. unshar.o : unshar.c
  91.     ${CC} ${CFLAGS} -c unshar.c
  92.  
  93. uushar.o : uushar.c
  94.     ${CC} ${CFLAGS} -c uushar.c
  95.  
  96. who@where.o : who@where.c
  97.     ${CC} ${CFLAGS} -c who@where.c
  98.  
  99. install : shar unshar inst-man
  100.     scoinst shar ${BINDIR}
  101.     scoinst unshar ${BINDIR}
  102.  
  103. inst-man:
  104.     scoinst shar.1   ${MANDIR}/shar.${MANEXT}
  105.     scoinst unshar.1 ${MANDIR}/unshar.${MANEXT}
  106.  
  107. clean clobber:
  108.     rm -f shar unshar *.o core
  109.  
  110. SETV =    X="`head -1 shar.c`"; \
  111.     V=`expr "$$X" : 'char \*revision = "\([1-9][0-9]*\.[0-9.a-zA-Z]*\)";$$'`;
  112.  
  113. post : ${SOURCES}
  114.     ${SETV} test -n "$$V" && ( \
  115.     rm -f shar$$V.[0-9][0-9]; \
  116.     shar -l50 -acF -n "shar$$V" -o "shar$$V" ${SOURCES} )
  117.  
  118. compressed : ${SOURCES}
  119.     ${SETV} test -n "$$V" && \
  120.     shar -acFm -b16 -n "shar$$V" > "shar$$V" ${SOURCES}
  121.  
  122.